package com.mauriciobustamante.pruebapds;

import com.mauriciobustamante.modelo.Accion;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class Principal extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_principal);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_principal, menu);
        return true;
    }
    
    public void ingresarPacientes(View v){
    	Intent myIntent = new Intent(Principal.this, IngresarPaciente.class);
    	Principal.this.startActivity(myIntent);
    }
    
	public void buscarPrestacion(View v){
		Intent myIntent = new Intent(Principal.this, BuscarPrestacion.class);
		Principal.this.startActivity(myIntent);
	}
	
	public void buscarPaciente(View v){
		Intent myIntent = new Intent(Principal.this, BuscarPaciente.class);
		Principal.this.startActivity(myIntent);
	}
	
	// paciente
	
	public void accionPaciente(View v){
		
		int accion = Integer.parseInt((String)v.getTag());

		Intent myIntent = new Intent(Principal.this, PacienteMaster.class);
		Bundle b = new Bundle();				
		b.putInt("accion", accion);
		myIntent.putExtras(b); 	
		Principal.this.startActivity(myIntent);
	}
	
	public void accionPrestacion(View v){
		
		int accion = Integer.parseInt((String)v.getTag());

		Intent myIntent = new Intent(Principal.this, PrestacionMaster.class);
		Bundle b = new Bundle();				
		b.putInt("accion", accion);
		myIntent.putExtras(b); 	
		Principal.this.startActivity(myIntent);
	}
	
	// paciente prestacion
	
	public void accionPrestacionPaciente(View v){
		int accion = Integer.parseInt((String)v.getTag());

		Intent myIntent = new Intent(Principal.this, PrestacionPacienteMaster.class);
		Bundle b = new Bundle();				
		b.putInt("accion", accion);
		myIntent.putExtras(b); 	
		Principal.this.startActivity(myIntent);
	}


	public void ingresarPrestacionPaciente(View v){
		Intent myIntent = new Intent(Principal.this, IngresarPrestacionPaciente.class);
		Principal.this.startActivity(myIntent);
	}

	
}
